﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.SessionState;
using System.Web;
using System.Web.Mvc;
using System.Configuration;
using OpenQuarters.WebQuarters.Utils;

namespace OpenQuarters.WebQuarters.Core
{
    public class Oracle
    {
        public static ControllerContext CurrentControllerContext
        {
            get { return ContextItem.GetItem<ControllerContext>("Oracle.CurrentControllerContext", () => null); }
            set { ContextItem.SetItem<ControllerContext>("Oracle.CurrentControllerContext", value); }
        }

        public static HttpSessionState Session
        {
            get { return HttpContext.Current.Session; }
        }

        public static HttpRequest Request
        {
            get { return HttpContext.Current.Request; }
        }

        public static HttpResponse Response
        {
            get { return HttpContext.Current.Response; }
        }

        public static HttpContext Context
        {
            get { return HttpContext.Current; }

        }
        public static SettingsSection GetSettings()
        {
            return ConfigurationManager.GetSection("WebQuartersConfiguration") as SettingsSection;
        }
    }
}
